Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BC break] Keep Guzzle v6 in v2 #512

Closed
wants to merge 1 commit into from

Conversation

karser
Copy link

@karser karser commented Apr 30, 2021

This plugin is bundled with aws-sdk-php which requires guzzlehttp/guzzle:^5.3.3|^6.2.1|^7.0.
In version 2.2.1 there was guzzlehttp/guzzle:6.5.5.
But in 2.3.0 it's now guzzlehttp/guzzle:7.2.0.

I have other plugins that require guzzle v6 and they crashed after the update to v2.3.0.
Since in PHP it's not possible to have 2 classes loaded of a different version, because if the class is already loaded it will not load it twice.

Please downgrade the guzzle version, at least in v2.

Copy link

@hm-linter hm-linter bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linting failed (1161 errors).

(1149 notices occurred in your codebase, but were on files/lines not included in this PR.)

@karser karser changed the title [BC] Use Guzzle v6 in v2 [BC] Keep Guzzle v6 in v2 Apr 30, 2021
@karser karser changed the title [BC] Keep Guzzle v6 in v2 [BC break] Keep Guzzle v6 in v2 Apr 30, 2021
@karser karser changed the base branch from master to v2-branch April 30, 2021 18:46
@roborourke
Copy link
Contributor

Are your other plugin installed via composer too? Or do they bundle Guzzle v6?

@karser
Copy link
Author

karser commented Jun 15, 2021

The same way as S3-Uploads: it bundles Guzzle v6 installed with composer

@karser
Copy link
Author

karser commented Jun 15, 2021

Maybe it should be a separate build with guzzle-v6? Like manual-install-guzzle-v6.zip?

@roborourke
Copy link
Contributor

If they’re installed via composer it should be able figure out a compatible set of packages. What happens if you add guzzle v6 as a requirement in your main composer file?

@karser
Copy link
Author

karser commented Jun 15, 2021

I don't have composer.json on the project level. The plugin zip files are downloaded and extracted, and that's it. So every plugin has its own vendor folder and autoloading.
Do you have global composer.json? How does it work for wordpress?

@roborourke
Copy link
Contributor

Ah I see. Yeah that makes things difficult. You have a couple of options but I'd recommend reading through this primer https://composer.rarst.net/

At the simplest level you can use a composer.json and add https://wpackagist.org/ as a repository, then you can install WP plugins / themes. Composer will automatically place packages of the type wordpress-plugin in the plugins directory for example.

@joehoyle
Copy link
Member

Close as old

@joehoyle joehoyle closed this Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants